The automatic rollback only happens if you initiate the transaction via pdo : : begintransaction 只有在通過(guò)pdo : : begintransaction ( )啟動(dòng)事務(wù)的情況下,才會(huì)發(fā)生自動(dòng)回滾。
After set xact abort on is executed , any run - time statement error causes an automatic rollback of the current transaction 在執(zhí)行set xact _ abort on語(yǔ)句后,任何運(yùn)行時(shí)語(yǔ)句錯(cuò)誤都將導(dǎo)致自動(dòng)回滾當(dāng)前事務(wù)。
I think this is rather inconsistent , that system exceptions cause automatic rollback while application exceptions specifically do not 我認(rèn)為這是非常矛盾的,系統(tǒng)異常引發(fā)了自動(dòng)回滾而應(yīng)用程序異常不能。